Skip to content

feat(core) Add preferred transport changed event#3320

Open
yrb wants to merge 1 commit intozmkfirmware:mainfrom
yrb:preferred_transport_changed_event
Open

feat(core) Add preferred transport changed event#3320
yrb wants to merge 1 commit intozmkfirmware:mainfrom
yrb:preferred_transport_changed_event

Conversation

@yrb
Copy link
Copy Markdown

@yrb yrb commented Apr 5, 2026

Adds an event on preferred transport changing. The primary use of this is to drive display updates in the case the preferred transport changes but the active endpoint does not change.

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

@yrb yrb requested a review from a team as a code owner April 5, 2026 20:17
Copy link
Copy Markdown
Contributor

@snoyer snoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I tested with a custom display and it does solve the use-case of notifying when going between &out OUT_BLE and &out OUT_USB while only one of USB or BLE is available (meaning the active endpoint has nothing to change to, as mentioned in the description, and therefore no existing endpoint_changed event is fired).

Hopefully @joelspadin can do an actual review

Comment thread app/include/zmk/events/preferred_transport_changed.h Outdated
Comment thread app/src/events/preferred_transport_changed.c Outdated
Added an event for the preferred transport changing, this is primarily
to trigger display updates.
@yrb yrb force-pushed the preferred_transport_changed_event branch from bdc1ab8 to fe3bba3 Compare April 17, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants